package d1116.r211.num06;

public class ZooApp {
    public static void main(String[] args) {
        Feeder feeder = new Feeder("张三");
        feeder.feed(new Cat("美短"), new Food("小鱼干"));
        feeder.feed(new Cat("金毛"), new Food("肉骨头"));
        feeder.feed(new Animal("猫咪") {      //匿名内部类
            @Override
            public void shout() {
                System.out.println("嗷嗷嗷~~~");
            }
        }, new Food("猫草"));
    }
}
